package com.neusoft.nepm.controller;

import com.neusoft.nepm.po.AqiFeedback;
import com.neusoft.nepm.service.IAqiFeedbackService;
import com.neusoft.nepm.vo.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zouran
 * createDate：2023/6/19  18:09
 */
@RestController
@RequestMapping("/aqiFeedback")
@Api(tags = "空气质量管理接口")
public class AqiFeedbackController {
    @Autowired
    private IAqiFeedbackService service;

    /********************** neps工程 **********************/
    @RequestMapping("/saveAqiFeedback")
    @ApiOperation(value = "提交当前空气质量")
    public ResponseData saveAqiFeedback(@RequestBody AqiFeedback aqiFeedback) {
        return service.saveAqiFeedback(aqiFeedback);
    }

    @GetMapping("/listAqiFeedbackByTelId")
    @ApiOperation(value = "根据手机号查询历史反馈列表")
    public ResponseData<List<AqiFeedback>> listAqiFeedbackByTelId(String telId) {
         return service.listAqiFeedbackByTelId(telId);
    }
}
